home *** CD-ROM | disk | FTP | other *** search
- Path: gryphon.phoenix.net!usenet
- From: brucew@phoenix.net (Bruce Wedding)
- Newsgroups: comp.lang.c
- Subject: Re: Why is Gets() so bad?
- Date: Mon, 04 Mar 1996 05:43:48 GMT
- Organization: BranPaul Systems
- Message-ID: <4hdvuv$3vr@gryphon.phoenix.net>
- References: <4hb1ie$pa7@ixnews2.ix.netcom.com>
- NNTP-Posting-Host: dial84.phoenix.net
- X-Newsreader: Moe's Newsreader
-
- In comp.lang.c
- studwoof@ix.netcom.com(Studcat's Big Studdog.) wrote:
-
- >Hi.. I'm not a newbie.. I don't even use Gets(), fgets(), or scanf.. I
- >use my own getstring function. My question is that everywhere I see
- >that gets() is bad. Why exactly is it so bad? Could someone please
- >explain in more detail than what the FAQ does? Thanks.
-
- It's really simple. gets() gives you no control over the quanity
- of chars input. Without this control, there is ALWAYS the
- possiblity of your array that stores the input being overrun.
-
-
- Bruce D. Wedding Have Compiler, Will Travel!
- Perspicacious Programming Performed Promptly
- Katy, Texas, USA, Planet Earth, Milkyway Galaxy, Known Universe
-
-